package com.mc.algorithm;
import java.util.Scanner;
import java.util.Iterator;
import java.util.Set;
import java.util.HashSet;

public class Cannon {
		
		public static void main(String[] agrs){
	        Scanner sc = new Scanner(System.in);
	        while(sc.hasNext()){
	            int dis = sc.nextInt();
	            Set<Point> set = new HashSet<Point>();
	            for(int i=0;i<3;i++){
	            	int x = sc.nextInt();    
	           		int y = sc.nextInt();
	                set.add(new Point(x,y));
	            }
	            int x0 = sc.nextInt();
	            int y0 = sc.nextInt();
	            int res =comp(set,new Point(x0,y0),dis);        
	        	System.out.println(res+"x");
	        }                    
	    }
	   
	    public static int comp(Set set, Point en,int dis){
	        Iterator<Point> iter = set.iterator();
	        int count = 0;
	        while(iter.hasNext()){
				Point node = iter.next();
	            double t1 =node.x-en.x;
	            double t2 =node.y-en.y;
	        	double t3 = Math.pow(t1,2)+Math.pow(t2,2);
	            if(Math.sqrt(t3)<=dis)
	                count++;
	        }
	        return count;
	        
	    }
	    static class Point{
	        int x;
	        int y;
	        Point(int a,int b){
				x =a;
	            y =b;
	        }
	    }
}
